Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure/ms-rest-js

Package Overview
Dependencies
Maintainers
4
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/ms-rest-js

Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest

  • 2.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
882K
decreased by-4.26%
Maintainers
4
Weekly downloads
 
Created

What is @azure/ms-rest-js?

@azure/ms-rest-js is a package provided by Microsoft Azure that offers a set of tools for making HTTP requests and handling responses, particularly for Azure services. It includes features for authentication, serialization, and deserialization of data, and provides a foundation for building SDKs for Azure services.

What are @azure/ms-rest-js's main functionalities?

HTTP Client

The HTTP Client feature allows you to send HTTP requests and handle responses. This is useful for interacting with RESTful APIs.

const { HttpClient } = require('@azure/ms-rest-js');
const client = new HttpClient();
client.sendRequest({ url: 'https://example.com', method: 'GET' }).then(response => {
  console.log(response.bodyAsText);
});

Authentication

The Authentication feature provides support for various authentication mechanisms, such as token-based authentication, which is essential for securely accessing Azure services.

const { TokenCredentials } = require('@azure/ms-rest-js');
const credentials = new TokenCredentials('your-access-token');
const client = new HttpClient(credentials);
client.sendRequest({ url: 'https://example.com', method: 'GET' }).then(response => {
  console.log(response.bodyAsText);
});

Serialization and Deserialization

The Serialization and Deserialization feature allows you to convert JavaScript objects to and from JSON, which is useful for sending and receiving data in a structured format.

const { Serializer } = require('@azure/ms-rest-js');
const serializer = new Serializer();
const model = { name: 'example', age: 30 };
const serializedModel = serializer.serialize({ type: { name: 'Composite', className: 'Model', modelProperties: { name: { serializedName: 'name', type: { name: 'String' } }, age: { serializedName: 'age', type: { name: 'Number' } } } } }, model);
console.log(serializedModel);

Other packages similar to @azure/ms-rest-js

Keywords

FAQs

Package last updated on 06 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc